import http from "../../request.js"




// 1. 生成确认单
function addPreOrder(data) {
	return http({
		url: "/lejuClient/order/addPreOrder",
		data: data, //1308336521604599809
		method: "POST"
	})
}

// 2. 根据订单id获取订单详细
function getPreOrderById(orderId,data) {
	return http({
		url: `/lejuClient/order/getPreOrderById/${orderId}`,
		data: data, //1308336521604599809
	})
}


// 3. 提交确认订单
function addConfirmOrder(data) {
	return http({
		url: "/lejuClient/order/addConfirmOrder",
		data: data, //1308336521604599809
		method: "POST"
	})
}


// 4. 确认付款
function payConfirm(data) {
	return http({
		url: "/lejuClient/order/payConfirm",
		data: data, //1308336521604599809
		method: "POST"
	})
}

// 5. 确认收货
function receiveDone(data) {
	return http({
		url: "/lejuClient/order/receiveDone",
		data: data, //1308336521604599809
		method: "POST"
	})
}


// 6. 删除订单
function deleteOrder(orderId,data) {
	return http({
		url: `/lejuClient/order/deleteOrder/${orderId}`,
		data: data, //1308336521604599809
		method: "DELETE"
	})
}






export {
	addPreOrder,
	getPreOrderById,
	addConfirmOrder,
	payConfirm,
	receiveDone,
	deleteOrder
}
